# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Contributor: Bartosz Taudul <wolf@nereid.pl>

pkgname=vulkan-utility-libraries
pkgver=1.3.269
pkgrel=1
arch=(loong64 x86_64)
url="https://www.khronos.org/vulkan/"
pkgdesc="Vulkan Utility Libraries"
license=('Apache')
depends=('libvulkan.so')
makedepends=('cmake' 'python' 'vulkan-headers')
groups=('vulkan-devel')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/KhronosGroup/Vulkan-Utility-Libraries/archive/v${pkgver}.tar.gz")
sha256sums=('1ba3a9937aa2932c8d3ed19949df95612ca1a4d5f64b892c8a1559a03bc355b1')

prepare() {
  cd "${srcdir}"/Vulkan-Utility-Libraries*

  rm -rf build && mkdir build
}

build() {
  cd "${srcdir}"/Vulkan-Utility-Libraries*/build

  cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_SYSCONFDIR=/etc \
    -DCMAKE_INSTALL_DATADIR=/usr/share \
    -DCMAKE_BUILD_TYPE=Release \
    ..
  make
}

package() {
  cd "${srcdir}"/Vulkan-Utility-Libraries*/build
  
  make DESTDIR="${pkgdir}" install
}
